package com.gusti.mensajes.model;

import java.util.GregorianCalendar;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;

import com.gusti.mensajes.persistence.model.AbstractModelObject;

/**
 * 
 * @author gusti
 *
 */
@Entity
public class Message extends AbstractModelObject {

	@ManyToOne
	private User owner;
	@ManyToOne
	private ConversationThread conversationThread;
	@Column( length=1000  )
	private String message;
	private GregorianCalendar sendDate;
	private GregorianCalendar readDate;

	public User getOwner() {
		return owner;
	}
	public void setOwner(User owner) {
		this.owner = owner;
	}
	public ConversationThread getConversationThread() {
		return conversationThread;
	}
	public void setConversationThread(ConversationThread conversationThread) {
		this.conversationThread = conversationThread;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public GregorianCalendar getSendDate() {
		return sendDate;
	}
	public void setSendDate(GregorianCalendar sendDate) {
		this.sendDate = sendDate;
	}
	public GregorianCalendar getReadDate() {
		return readDate;
	}
	public void setReadDate(GregorianCalendar readDate) {
		this.readDate = readDate;
	}
}
